﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using DAOService;
using DTOService;

namespace BUSService
{
    [ServiceContract]
    public interface IMyService
    {
        [OperationContract]
        bool ConnectToService();

        #region TinhTrang
        [OperationContract]
        TinhTrang[] SelectTinhTrang();
        [OperationContract]
        TinhTrang GetTinhTrang(int ma);
        [OperationContract]
        int InsertTinhTrang(TinhTrang parr);
        [OperationContract]
        int UpdateTinhTrang(TinhTrang parr);
        [OperationContract]
        int DeleteTinhTrang(TinhTrang parr);
        #endregion

        #region LoaiSanPham
        [OperationContract]
        LoaiSanPham[] SelectLoaiSanPham();
        [OperationContract]
        int InsertLoaiSanPham(LoaiSanPham parr);
        [OperationContract]
        int UpdateLoaiSanPham(LoaiSanPham parr);
        [OperationContract]
        int DeleteLoaiSanPham(LoaiSanPham parr);
        [OperationContract]
        LoaiSanPham GetLoaiSanPham(int id);
        #endregion

        #region LoaiBangDia
        [OperationContract]
        LoaiBangDia[] SelectLoaiBangDia();
        [OperationContract]
        LoaiBangDia GetLoaiBangDia(int ma);
        [OperationContract]
        int InsertLoaiBangDia(LoaiBangDia parr);
        [OperationContract]
        int DeleteLoaiBangDia(LoaiBangDia parr);
        [OperationContract]
        int UpdateLoaiBangDia(LoaiBangDia parr);
        #endregion

        #region KhachHang
        [OperationContract]
        KhachHang[] SelectKhachHang();
        [OperationContract]
        KhachHang GetKhachHang(string ma);
        [OperationContract]
        KhachHang[] SearchKhachHang(string ten);
        [OperationContract]
        string InsertKhachHang(KhachHang parr);
        [OperationContract]
        string UpdateKhachHang(KhachHang parr);
        [OperationContract]
        KhachHang[] SelectKhachHangTheoTen(string name);
        [OperationContract]
        KhachHang[] SelectKhachHangTheoTen_Limit(string name,int startIndex,int numRows);
        [OperationContract]
        KhachHang[] SelectKhachHang(int startIndex,int numRows);
        [OperationContract]
        int NumberOfKhachHang();
        [OperationContract]
        int NumberOfKhachHang(string name);
        [OperationContract]
        int SoBangDiaKhachHangDangThue(KhachHang parr);
        #endregion

        #region BangDia
        [OperationContract]
        BangDia[] SelectBangDia();
        [OperationContract]
        BangDia[] SelectBangDia(string name);
        [OperationContract]
        int UpdateBangDia(BangDia bd);
        [OperationContract]
        int DeleteBangDia(String mabd);
        [OperationContract]
        bool InsertBangDia(BangDia bd);
        [OperationContract]
        string SetMaBangDia();
        [OperationContract]
        BangDia GetBangDia(string ma);
        [OperationContract]
        int GhiNhanTinhTrang(string ma, int flag);
        [OperationContract]
        BangDia[] TimKiemBangDia(BangDia bd, int pagesize, int skip);
        [OperationContract]
        int NumberBangDia();
        [OperationContract]
        int NumberBangDia(BangDia bd);
        [OperationContract]
        BangDia[] SelectBangDia_Limit(int pagesize, int skip);
        [OperationContract]
        BangDia[] SelectBangDiaThueNhieuNhat();
        [OperationContract]
        BangDia[] ThongKeBangDiaThueNhieu(int thang, int nam);
        #endregion

        #region QuyDinh
        [OperationContract]
        QuyDinh SelectQuyDinh();
        [OperationContract]
        int UpdateQuyDinh(QuyDinh parr);
        #endregion

        #region BangDia_Muon
        [OperationContract]
        BangDia_Muon[] BaoCaoThang_Nam(int thang, int nam);
        [OperationContract]
        float TongDoanhThuThang(int thang);
        [OperationContract]
        BangDia_Muon[] ThongKeBangDiaQuanHan();
        [OperationContract]
        BangDia_Muon[] GetBangDia_MuonOFKhachhang(string makh);
        [OperationContract]
        BangDia_Muon GetBangDia_Muon(string mabd, string makh);
        [OperationContract]
        int TraDia(BangDia_Muon bdm);
        [OperationContract]
        string ChoThueBangDia(BangDia_Muon parr);
        #endregion

        #region BangDia_MatHuHong

        #endregion

    }
}
